<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Activity extends CI_Controller {

	private $pageSize = '20'; //每一页的记录数

	/**
	 * 具体商品列表页面
	 * 
	 * @param int $category_id 当前分类的ID
	 * @param string $type 默认为空,当前列表的排序方式,可以是价格,销售量,上架时间等等
	 * 
	 * @return void
	 */
	public function danci($ban_id)
	{
		if(!$ban_id || !is_numeric($ban_id))
		{
			header("location:".base_url());
			exit;
		}
		$data = array("style"=>"activity/danci","title"=>"单词书促销");
		
		$this->load->model("m_activity");
		$data['activitys'] = $this->m_activity->selectActivity($ban_id);
		
		$this->load->view('header',$data);
		$this->load->view('activity/danci');
		$this->load->view('footer');
	}
	
	public function njfu($ban_id)
	{
		if(!$ban_id || !is_numeric($ban_id))
		{
			header("location:".base_url());
			exit;
		}
		$data = array("style"=>"activity/njfu","title"=>"南林自编图书");
		
		$this->load->model("m_activity");
		$data['activitys'] = $this->m_activity->selectActivity($ban_id);
		
		$this->load->view('header',$data);
		$this->load->view('activity/njfu');
		$this->load->view('footer');
	}
	
	public function kaoyan($ban_id)
	{
		if(!$ban_id || !is_numeric($ban_id))
		{
			header("location:".base_url());
			exit;
		}
		$data = array("style"=>"activity/kaoyan","title"=>"考研黄皮书促销");
		
		$this->load->model("m_activity");
		$data['activitys'] = $this->m_activity->selectActivity($ban_id);
		
		$this->load->view('header',$data);
		$this->load->view('activity/kaoyan');
		$this->load->view('footer');
	}
}

/* End of file fenzhong.php */
/* Location: ./application/controllers/fenzhong.php */